home *** CD-ROM | disk | FTP | other *** search
/ The X-Philes (2nd Revision) / The X-Philes Number 1 (1995).iso / xphiles / hp48_2 / chasm01.sha / chasm.h < prev    next >
C/C++ Source or Header  |  1995-03-23  |  2KB  |  60 lines

  1. /*
  2.  *    chasm.h - chasm header file
  3.  *
  4.  *    @(#)chasm.h    1.1 91/04/10
  5.  *
  6.  *    Copyright (c) 1991 Steve Scherf
  7.  *
  8.  *    Author:    Steve Scherf
  9.  *    Date:    Wed Apr 10 22:53:11 PDT 1991
  10.  *
  11.  */
  12.  
  13. #include <stdio.h>
  14.  
  15. /* external definitions */
  16. extern FILE *ifp;
  17. extern int pars_err;
  18. extern int add_lab();
  19.  
  20. #define    LOADADR    0x200    /* binaries are loaded at this address */
  21. #define MAXADDR 0xFFF    /* maximum addressible memory location */
  22.  
  23. /* input token definitions */
  24. #define  STRING    257    /* string token */
  25. #define  REG    258    /* register token */
  26. #define  VAR    259    /* variable token */
  27. #define  CONST    260    /* long constant token */
  28. #define  LABEL    261    /* label token */
  29. #define  IBASE    262    /* first instruction */
  30.  
  31. /* instruction token definitions */
  32. #define  ADD    0    /* add */
  33. #define  AND    1    /* bitwise and */
  34. #define  BCD    2    /* store BCD representation of a number */
  35. #define  CLD    3    /* clear display */
  36. #define  DATA    4    /* store numeric data in memory (pseudo-instruction) */
  37. #define  DEF    5    /* define a constant (pseudo-instruction) */
  38. #define  DMP    6    /* dump registers */
  39. #define  DSP    7    /* display sprite at coordinates */
  40. #define  INK    8    /* input keystroke */
  41. #define  JMP    9    /* jump to instruction */
  42. #define  JOF    10    /* jump to instruction at offset */
  43. #define  JSR    11    /* jump to subroutine */
  44. #define  MEM    12    /* allocate memory (pseudo instruction) */
  45. #define  MOV    13    /* store a value */
  46. #define  OR    14    /* bitwise or */
  47. #define  RES    15    /* restore registers */
  48. #define  RET    16    /* return from subroutine */
  49. #define  RND    17    /* random number */
  50. #define  SAR    18    /* subtract and replace */
  51. #define  SEQ    19    /* skip if equal */
  52. #define  SHL    20    /* bitwise left shift */
  53. #define  SHR    21    /* bitwise right shift */
  54. #define  SIP    22    /* skip if key pressed */
  55. #define  SNE    23    /* skip if not equal */
  56. #define  SNP    24    /* skip if not pressed */
  57. #define  SSC    25    /* set sprite character */
  58. #define  SUB    26    /* subtract */
  59. #define  XOR    27    /* bitwise exclusive or */
  60.